<!-- 搜索框及工具条 -->
<div class="c-head-box">
    <form method="get" action="{:Url('cooperate_list')}">
        <ul>
            <li class="c-head-search">
                <!-- 搜索条件 -->
                <ul>
                    <li><span>合作商编号：</span><input type="text" name="cooperate_id" value="{$cooperate_id}"/></li>
                    <li><span>合作商名称：</span><input type="text" name="cooperate_name" value="{$cooperate_name}"/></li>
                    <li style="width: 100%"><span>所在城市：</span>{:widget('common/Select/select_group',array('area',array($area_list,"area_id","acronym","parent_id"),0,$area))}</li>
                </ul>
            </li>
            <li class="c-head-button">
                <!-- 操作按钮 -->
                <div class="fr"><input type="submit" class="but_blue" value="搜索"></div>
                <div class="fr"><a class="but_blue" href="{:Url('cooperate_add')}">添加合作商</a></div>
            </li>
        </ul>
    </form>
</div>
<!--用户列表-->
<div class="lists-tab-cont">
    <div class="lists-table">
        <table class="pointer" cellpadding="0" cellspacing="0" border="0">
            <thead>
            <tr>
                <th style="width: 6%;" class="tabSort-header"><a class="tabSort-header-inner"><p>合作商编号</p></a></th>
                <th style="width: 8%;" class="tabSort-header"><a class="tabSort-header-inner"><p>合作商名称</p></a></th>
                <th style="width: 6%;" class="tabSort-header"><a class="tabSort-header-inner"><p>所在省</p></a></th>
                <th style="width: 6%;" class="tabSort-header"><a class="tabSort-header-inner"><p>所在市</p></a></th>
                <th style="width: 6%;" class="tabSort-header"><a class="tabSort-header-inner"><p>所在区</p></a></th>
                <th style="width: 10%;" class="tabSort-header"><a class="tabSort-header-inner"><p>详细地址</p></a></th>
                <th style="width: 10%;" class="tabSort-header"><a class="tabSort-header-inner"><p>创建时间</p></a></th>
                <th style="width: 6%;" class="tabSort-header"><a class="tabSort-header-inner"><p>删除状态</p></a></th>
                <th class="tabSort-header"><a class="tabSort-header-inner"><p>操作</p></a></th>
            </tr>
            </thead>
            <tbody>
            {foreach name="cooperate_list" item="info"}
            <tr>
                <td>{$info.cooperate_id}</td>
                <td>{$info.cooperate_name}</td>
                <td>{:widget('common/Name/area',array($info["province_id"]))}</td>
                <td>{:widget('common/Name/area',array($info["city_id"]))}</td>
                <td>{:widget('common/Name/area',array($info["area_id"]))}</td>
                <td>{$info.address}</td>
                <td>{$info.create_time}</td>
                <td>{:widget('common/Color/color',array('is_delete',$info['is_delete']))}</td>
                <td>
                    <a data-type="info-win" data-src="{:Url('cooperate_info',array('cooperate_id'=>$info['cooperate_id']))}" data-title="详情" data-width="80%" data-height="80%" class="blue">详情</a>
                    <a href="{:Url('cooperate_edit',array('cooperate_id'=>$info['cooperate_id']))}" class="blue">编辑</a>
                    <a href="{:Url('cooperate_admin_list',array('cooperate_id'=>$info['cooperate_id']))}" class="blue">管理员</a>
                    {if condition="$info['is_delete'] == 1"}
                    <a href="{:Url('cooperate_del',array('cooperate_id'=>$info['cooperate_id']))}" class="blue info1">删除</a>
                    {else/}
                    <a href="{:Url('cooperate_restore',array('cooperate_id'=>$info['cooperate_id']))}" class="blue info2"><font color="red">还原</font></a>
                    {/if}

                </td>
            </tr>
            {/foreach}
            </tbody>
        </table>
    </div>

    <!-- 翻页模板 -->
    <div class="page">
        {$Think.config.page_html}
    </div>
</div>

<!-- JS处理 -->
<script language="javascript">
    $(function(){
        //提示信息
        $("a.info1").click(function(){
            if(confirm("您确定要禁用该合作商吗？")){
                return true;
            }else{
                return false;
            }
        });
    });
    $(function(){
        //提示信息
        $("a.info2").click(function(){
            if(confirm("您确定要还原该合作商吗？")){
                return true;
            }else{
                return false;
            }
        });
    });
</script>
